import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home'
import Ts from '@/views/Ts'
import Ts2 from '@/views/Ts2'
import Dashboard from '@/views/dashboard'
import Article from '@/views/article'
import Login from '@/views/Login'
import NotFount from '@/views/404'
// import Container from '@/views/Container'
import Main from '@/views/Main'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login,
      ismenu: false
    },
    {
      path: '/',
      redirect: '/dashboard',
      name: 'Home',
      menu: true,
      component: Home,
      children: [
        { path: '/dashboard', name: 'Dashboard', icon: 'tachometer', component: Dashboard},
        {
          path: '/dashboard', name: '菜单一', icon: 'menu', component: Main,
          children: [
            { path: '/ts1', name: '文章一', component: Ts},
            { path: '/ts2', name: '文章二', component: Ts2}
          ]
        },
        { path: 'article', name: '文章', icon: 'menu', component: Article}
      ]
    },
    {
      path: '*',
      name: 'NotFount',
      component: NotFount
    }
  ]
})
